Electronic data recorder for electric energy metering

ABSTRACT

An electronic remote data recorder records pulses representing usage of a commodity such as, for example, water, gas or electricity from a plurality of consumers. The data from each consumer is stored in a respective data storage device. Each data storage device is associated with an interval data directory which stores the times at which significant events, affecting the data in the data storage device occurred. Thus, the data in the data storage device is compact, without requiring a contemporaneous time code for each data item. Data integrity is retained over a period of power outage in a non-volatile storage device. Initial, post-installation programming is enabled by comparing the data pattern in the non-volatile storage device with a predefined data pattern that is expected to exist once the apparatus has been programmed. A write-protect switch prevents programming during an incoming call after the initial programming. Programming from an external source may be permitted during a telephone call initiated by the data recorder itself. A telephone line-sharing device permits a plurality of remote data recorders to share a single telephone line without interfering with each other.

This is a continuation of copending application Ser. No. 07/267,557filed on Nov. 7, 1988, now abandoned.

This is a divisional of co-pending application Ser. No. 119,790 filed onDec. 28, 1987 now U.S. Pat. No. 4,862,493.

BACKGROUND OF THE INVENTION

The present invention relates to data recorders and, more particularly,to digital data recorders adapted for remote access over dial-uptelephone lines.

Since the earliest days of utilities providing energy in the form of gasand electricity, the consumption of energy has been metered at theuser's location. Collecting the metered data has been done traditionallyby a meter reader visiting the user's consumer's location at regularintervals to note the indication on an indicator such as, for example,dials or drums on an electro-mechanical register or an electronicdisplay or digital readout. In one series of electric meters produced bythe General Electric Company, readout accuracy and speed are enhanced byan optical readout device accessing the data through an optical portprovided under the trademark Optocom.

The cost of electric energy is generally considered to consist of twoparts: out-of-pocket costs and capital costs.

Out-of-pocket costs are those required for the generation anddistribution of the electric energy. Such costs are fairly recovered bya charge based on the actual consumption of energy.

Capital costs are those that the utility must bear to be prepared tosupply the total electricity needs of all of its consumers. It is wellknown that the consumption of electricity has diurnal, as well asseasonal, patterns. In hot summer weather, for example, it is well knownthat peak consumption is reached in some systems in the late afternoonas consumers return home and turn on their air conditioners. In winter,similar peaks arise from lighting loads synchronized by early darknesscausing business and residential consumers to turn on lighting fixturesat about the same time. Business and industrial consumers produceconsumption peaks from motor start-up loads and the energy consumptionof air conditioning, lighting and other business and industrial uses.

The size and cost of a plant for generating and distributing electricityare determined by the peak load the plant must accommodate. Thus, thecapital cost of building a generation and distribution facility issimilarly governed by the peak load, rather than the average load.

Demand metering is concerned with the magnitudes of consumption peaksrather than with the times they occur. Conventional demand metersaccumulate the amount of energy usage in each of a continuous sequenceof demand intervals. At the end of each demand interval, the energyconsumption in the interval is compared to a stored value representingthe maximum demand in all previous demand intervals in a current period.If the demand in the just-ended demand interval exceeds the demand inthe previous demand interval having highest demand, a new highest-demandis stored and the previous high demand is erased. When read out, themaximum demand is used to influence the rate at which the consumer'stotal electric energy consumption is billed for a period which mayextend for a period as long as a year or more.

The familiar electric meter for residential consumers contains amechanical register accumulating total energy usage in units of, forexample, kilowatt hours. No distinction is made for the time duringwhich the consumption occurs or for peaks in energy consumption, as intime-of-use and demand systems. The times (of day, week and year) duringwhich consumption occurs is critical to time-of-use or demand metering.

Electronic demand and time-of-use register generally mimic the functionsof their mechanical predecessors. Most electronic registers add displayand analysis features not easily implemented in mechanical registers,but not of interest to the present invention.

Physical reading of registers in electric meters is a substantial burdenon the utility providing the electric energy. It is thus desirable toprovide means for the utility to read the consumption and time-dependenttime-of-use and/or demand data from user's registers without requiring apersonal visit by a meter reader.

One way to provide remote reading of a register includes a dedicatedline such as, for example, a dedicated telephone line between a meteringdata center and a register in a consumer's facility. The metering datacenter is thereby enabled to query the condition of registers in theconsumer's facility at will. From a practical standpoint, an energyconsumer, absent a metering failure, requires a readout only atintervals of, for example, once a week or once a month. It is unlikelythat a utility is cost justified in interrogating the registers of evena large energy consumer more frequently than once a day. Thus, therelatively high cost of a dedicated telephone line is difficult tojustify, even in the case of a large energy consumer.

Another way to provide remote reading includes the use of a dial-uptelephone line with an auto-dial, auto-answer MODEM(modulator-demodulator) at the user's location. The amount of data thatmust be transmitted at any time between a metering data center and anenergy user fits well with the data transmission rates of whichcommercial MODEM devices are capable.

It is preferred that a data-communications system used with the presentinvention be able to share telephone facilities with other uses such as,for example, normal incoming or outgoing voice communication. Suchsharing requires that the system be able to recognize that the telephoneline is in use, and to delay demanding use of the telephone line untilit is free. It is further desirable that means be provided to permit thedata-communications system to be accessed by an incoming call. Suchmeans may include, for example, an auto-answer function in which thesystem engages the incoming line after a predetermined number of ringshave elapsed.

Whenever incoming telephone calls may access a data-communicationssystem, the subject of data security arises. It is not wise, in arevenue-intensive system such as a metering data communications system,to permit unauthorized access to the data and, perhaps more importantly,it is crucial to prevent unauthorized tampering with the data oroperating system. One method for avoiding unauthorized access to a datasystem includes the requirement that access to data requires input of apassword. In the absence of the required password, access is denied. Apassword can consist of any combination of alphanumeric and punctuationcharacters receivable by a MODEM.

A further access-security method includes callback control, whereinaccess to the system requires that an incoming call begin with apredetermined user code, equivalent to a password, be transmitted by thestation calling in. The data communications system then hangs up. If itreceived a correct user code, it calls a telephone number associatedwith the user code. Only then is communication established. Thus, inorder to establish communications, an incoming caller must have thecorrect user code and access to the particular telephone dialed inresponse to the user code.

Numerous other security techniques including, for example, encryption,are well known to those skilled in the art and thus do not requirefurther description.

Best advantage can be taken of access through a dial-up telephone lineif the line can be used for other purposes when not needed by the datacommunications system. For example, the data communications system maybe connected in parallel with the user's existing telephone line. Exceptfor a few relatively short periods when the data communications systemis in the process of communicating data with the metering data center,the user's line is undisturbed by the presence of the datacommunications system. Steps must be taken to prevent the datacommunications system from interfering with other uses and to preventother uses from corrupting the transmitted data.

Besides a data-communications system, an electronic remote data recorderrequires holding and recovery techniques to survive an intentional orunintentional power outage. Holding may be performed with battery backupfor the most critical components and data. Recovery requires thatrecording resume without losing revenue data and with time-dependentfunctions updated according to actual clock time, regardless of theconditions that prevailed when the power loss occurred. In addition,means for programming the functions of the electronic remote datarecorder, preferably over a telephone line, are desirable. An ability toreprogram remotely suggests that special security measures be providedto avoid unauthorized tampering with this function.

OBJECTS AND SUMMARY OF THE INVENTION

It is an object of the invention to provide an electronic remote datarecorder which overcomes the drawbacks of the prior art.

It is a further object of the invention to provide an electronic remotedata recorder having means for holding data during a power outage andfor recovering after power resumption.

It is a still further object of the invention to provide an electronicremote data recorder having means for permitting telephone line sharingwith other uses.

It is a still further object of the invention to provide an electronicremote data recorder having means for freezing changeable data duringdata transmission.

It is a still further object of the invention to provide an electronicremote data recorder having programmable write protection.

It is a still further object of the invention to provide an electronicremote data recorder having means for detecting a telephone linecondition indicating that the telephone line is in use.

It is a still further object of the invention to provide an electronicremote data recorder having means for initializing programmable outputswitch conditions according to an internal clock time.

It is a still further object of the invention to provide an electronicremote data recorder having simplified means for storing interval demanddata and for tracking a load profile through a programming change or atime reset.

Briefly stated, the present invention provides an electronic remote datarecorder which records pulses representing usage of a commodity such as,for example, water, gas or electricity from a plurality of consumers.The data from each consumer is stored in a respective data storagedevice. Each data storage device is associated with an interval datadirectory which stores the times at which significant events, affectingthe data in the data storage device occurred. Thus, the data in the datastorage device is compact, without requiring a contemporaneous time codefor each data item. Data integrity is retained over a period of poweroutage in a non-volatile storage device. Initial, post-installationprogramming is enabled by comparing the data pattern in the non-volatilestorage device with a predefined data pattern that is expected to existonce the apparatus has been programmed. A write-protect switch preventsprogramming during an incoming call after the initial programming.Programming from an external source may be permitted during a telephonecall initiated by the data recorder itself. A telephone line-sharingdevice permits a plurality of remote data recorders to share a singletelephone line without interfering with each other.

According to an embodiment of the invention, there is provided a powerfail detector and recovery apparatus for an electronic remote datarecorder, the electronic remote data recorder including a processortherein, comprising: means for producing a power failure signal inresponse to a first predetermined voltage reduction in a power source tothe electronic remote data recorder, the electronic remote data recorderbeing responsive to the power fail signal by halting operation of theprocessor, a non-volatile storage device for storing contents of theprocessor in the non-volatile storage upon occurrence of the power failsignal, means for restoring operation of the processor upon a secondpredetermined voltage increase in the power source above the firstpredetermined voltage, the means for restoring including means forcomparing a pattern of the contents in the non-volatile storage with apredetermined data pattern indicating a programmed electronic remotedata recorder, and for producing an enable signal when a pattern of thecontents indicates that the processor has not been previouslyprogrammed, and means responsive to the enable signal for connectingprogramming data from an external source to the processor for initialprogramming thereof.

According to a feature of the invention, there is provided a datarecording channel for an electronic remote data recorder comprising: adata memory, means for storing pulse data in the data memory, a datadirectory, means for storing in the data directory time and event-typedata related to the pulse data in the data directory memory, and thetime and event-type data being related to the stored pulse data topermit after-the-fact reconstruction of time information in the datamemory.

According to a further feature of the invention, there is provided adata recording channel for an electronic remote data recordercomprising: a data memory, means for storing pulse data in the datamemory, a first-in-first-out register, the pulse data passing throughthe first-in- first-out register before being stored in the data memory,and means responsive to data communication in progress for storingincoming data in the first-in-first-out register, whereby stationarydata is transmitted during the data communication.

According to a still further feature of the invention, there is providedan electronic remote data recorder for recording data in a usingfacility, the using facility including at least one function controlledby at least one programmable switch responsive to signals from theelectronic remote data recorder, comprising: means for controlling theat least one programmable switch in response to a clock, a programmableswitch library including a relationship of a condition of the at leastone programmable switch and at least one time, and means responsive topower restoration following a power outage for controlling the at leastone programmable switch according to a content of the programmableswitch library.

According to a still further feature of the invention, there is providedapparatus for sharing a single telephone line among at least first andsecond MODEMs, comprising: the first MODEM including a first linesharing circuit associated therewith, the second MODEM including asecond line sharing circuit associated therewith, the first and secondline-sharing circuits simultaneously monitoring the same telephone line,the first line-sharing circuit being a master, the second line-sharingcircuit being a slave, means in the first line-sharing circuit forresponding to an incoming call on a telephone line with an answersignal, means in the second line-sharing circuits for recognizing afirst unique identity code and for producing an answer signal inresponse thereto, the first line-sharing circuit including means forrecognizing the first unique identity code and for extinguishing itsanswer signal in response thereto, whereby control of communications istransferred to the second MODEM, means in the first line-sharingcircuits for recognizing a second unique identity code and for producingan answer signal in response thereto, and the second line-sharingcircuit including means for recognizing the second unique identity codeand for extinguishing its answer signal in response thereto, wherebycontrol of communications is transferred to the first MODEM.

The above, and other objects, features and advantages of the presentinvention will become apparent from the following description read inconjunction with the accompanying drawings, in which like referencenumerals designate the same elements.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified global block diagram of an energy-using facilitywhose data is stored and communicated to a metering data center by anelectronic remote data recorder according to an embodiment of theinvention.

FIG. 2 is a simplified block diagram of the electronic remote datarecorder of FIG. 1.

FIG. 3 is a block diagram of a data storage device of FIG. 2.

FIG. 4 is a logic diagram of a power fail and recovery circuit of FIG.3.

FIG. 5 is a logic diagram of a data storage channel of FIG. 3.

FIG. 6 is a block diagram of a communications control circuit of FIG. 2.

FIG. 7 is a simplified schematic diagram of a telephone system withwhich an other-phone detector of FIG. 6 is employed.

FIG. 8 is a curve showing typical variations in voltage on a typicaltelephone line, as seen by the other-phone detector of FIG. 7.

FIG. 9 is a block diagram of the other-phone detector of FIG. 7.

FIG. 10 is a block diagram of the signal conditioner of FIG. 9.

FIG. 11 is a simplified block global diagram of a plurality ofelectronic remote data recorders including means for all recorders to bepolled on a common telephone line without mutual interference.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring to FIG. 1, an electric energy consumer 10 which may be, forexample, a business, residential or manufacturing establishment.Electric energy consumer 10 includes electricity-consuming equipment(not shown) whose energy consumption is measured by one or morekilowatthour meters 12, 14 and 16. As represented by the vertical dashedline between kilowatthour meters 14 and 16, electric energy consumer 10may contain any required number of kilowatthour meters.

One skilled in the art will recognize that metering of energyconsumption may take other forms besides kilowatthour metering. Forexample, some utility systems may be interested in measuringkilovoltampere hours instead of, or in addition to, kilowatthours. Inaddition, a large installation is frequently metered on a time-of-useand/or demand basis. Thus, instead of kilowatthour meters 12, 14 and 16metering energy consumption from different loads, they may all beapplied to metering different aspects of energy consumption of a singleload. For example, if kilowatthour meter 14 is changed from akilowatthour meter to a kilovoltampere hour meter monitoring the sameload as kilowatthour meter 12, then both the real and reactivecomponents of the load are monitored. Further, if kilowatthour meter 14is changed from a kilowatthour meter to a kilowatthour demand orkilovoltampere hour demand meter, three different aspects of the loadconsumption are measured.

It is conventional in electric energy metering to produce output pulses,each of which memorializes the consumption of a predetermined quantum ofthe aspect of electric energy being metered. The pulses conventionallyconsist of switch closures of, for example, a mercury-wetted relay,solid state relay, or optical sensor. The output pulses are connectedfrom kilowatthour meters 12, 14 and 16 on lines 18, 20 and 22,respectively, to an electronic remote data recorder 24.

Data is communicated between electronic remote data recorder 24 and ametering data center 26 on a telephone line 28.

Referring now to FIG. 2, electronic remote data recorder 24 contains adata storage device 30 and a communications control unit 34. Datastorage device 30 receives and stores data pulses incoming on lines 18,20 and 22. In addition to data pulses, storage of time-dependent datasuch as, for example, data from which demand or time-of-use is to bereconstructed, may also be accompanied by data indicating the times atwhich the time-dependent data is produced. For economy, a conventionaltelephone instrument 36 may share use of telephone line 28 withelectronic remote data recorder 24.

The data in data storage device 30 is updated each time a data pulse isreceived. If a period during which data is read out of data storagedevice 30 encompasses a time when an input pulse is received by datastorage device 30, an ambiguity may result in the data sent out ontelephone line 28. Data storage device 30 includes means for preventingsuch ambiguity by freezing a snapshot of the data in data storage device30 at the instant that data communications begins. Thus, an internallyconsistent set of data is available for transmission to metering datacenter 26. New data pulses occurring during a transmission are notdiscarded; completion of their entry into data storage device 30 ismerely delayed until the end of transmission. Then, they are added tothe data, whereby they are available for transmission at the nextreadout.

Communications control unit 34 performs the functions required to permitaccess to the stored data in data storage device 30 and those requiredto prevent conflict in shared use of telephone line 28 with telephoneinstrument 36. These functions include a MODEM (modulator-demodulator)for converting serial binary (on-off) data to tone data suitable fortransmission on telephone line 28, off-hook detection by a user oftelephone instrument 36 and data security. Besides these functions,communications control unit 34 may be programmed to initiate a call tometering data center 26 under certain circumstances. Such circumstancesmay include, for example, the occurrence of a power outage andrestoration, detected probability of data corruption or scheduledroutine data transmissions. Also, communications control unit 34 may beenabled to receive and answer a call initiated by metering data center26, whereby special interrogation, troubleshooting or programming may beperformed without requiring an on-site visit.

An optional programmable switch assembly 38 is provided for controllingexternal functions of a using facility such as, for example, lighting,blowers, air conditioners or heating plants. In one embodiment of theinvention, programmable switch assembly 38 contains a plurality ofswitches controlled according to time of day to control the abovefunctions in an energy-management system for automatic control and forreducing peak loads. Programmable switch assembly 38 receives timeinformation on a line 40. The outputs of programmable switch assembly 38are connected on a line 42 to the controlled elements, the exactidentification of which are unimportant to the present disclosure.

Referring now to FIG. 3, data storage device 30 includes a plurality ofdata storage channels 44, 46 and 48 for receiving and storing pulse datafrom lines 18, 20 and 22, respectively. Data storage device 30, as wellas the remainder of electronic remote data recorder 24, operates undercontrol of a central processing unit 50 which may be, for example, asuitably programmed microprocessor. Central processing unit 50 receivesa signal on a line 123 indicating that a telephone has gone off line inthe consumer's facility. In response to this information, centralprocessing unit 50 may produce a signal requiring that its MODEM (notshown in FIG. 3) go off line to permit access to the telephone line byanother user. In addition, central processing unit receives a sample ofan AC line voltage for use in its internal timing functions.

A programmable switch library 52 contains information governing controlof programmable switch assembly 38 according to time. The data inprogrammable switch library 52 may be changed by control signals on aline 54 from central processing unit 50.

A power fail detection and recovery unit 56 receives a sample of the ACline voltage available to electric energy consumer 10 on a line 58. Inthe event that a voltage condition is detected which threatens validprocessing of data, power fail detection and recovery unit 56 produces anumber of signals for application on lines 60 and 62 which bringprocessing to a halt in processor 50 before even further lowering ofline voltage can produce data corruption. Power fail detection andrecovery unit 56 also detects a voltage condition indicating restorationof power. The signals on lines 60 and 62 enable resumption of normaloperation with due regard for tagging the data in data storage channels44, 46 and 48 with indications of the power outage, in order to permitresumption of the accumulation of pulse data inputs. Lines 62a and 62bcommunicate the condition of the line voltage to other elements inelectronic remote data recorder 24, as will be seen in the following.

All time-dependent functions in data storage device 30, as well aselsewhere in electronic remote data recorder 24, are controlledaccording to a master timing signal produced by a system clock 64.System clock 64 is preferably backed up by a long-life battery (notshown) to permit it to maintain synchronism with real time even whenelectronic remote data recorder 24 experiences a prolonged period out ofservice due, for example, to a lengthy power outage. System clock 64receives a control signal from central processing unit 50 as well as apower fail signal fed back from power fail detection and recovery unit56.

Central processing unit 50 receives a signal on a line 123 indicatingthat a second telephone has gone off hook while electronic remote datarecorder 24 is engaged in communications. In response to this signal,central processing unit produces a signal effective for placingelectronic remote data recorder 24 on hook, thereby enabling anotheruser in the facility to use the telephone.

Data is read out from data storage channels 44, 46 and 48 under controlof signals from central processing unit 50, onto an output data line 66.Data is connected to central processing unit 50 on a data line 68.Programming data for central processing unit 50 is first connected on aprogramming data line 70 to power fail detection and recovery unit 56which examines whether or not central processing unit 50 previously hasbeen programmed. If central processing unit 50 is in an unprogrammedcondition, indicating that initial programming should be permitted, orif other required conditions are satisfied, the program data isconnected from power fail detection and recovery unit 56 to centralprocessing unit 50 on line 60. If central processing unit 50 has beenpreviously programmed, as indicated by the pattern of data therein, thecondition of a write-protect switch in power fail detection and recoveryunit 56, as well as other considerations, determines whether or notprogramming data is connected to central processing unit 50.

Under most circumstances, it is not desirable to permit programming ofcentral processing unit 50 in response to an incoming telephone call.Even with password control, the danger of illegal entry to such arevenue-sensitive system makes such a prohibition a good choice.However, the need does exist for reprogramming to permit, for example,resetting system clock 64 and for accommodating changes in tariffs. Onetechnique permits reprogramming on a secure basis only during datacommunication initiated by electronic remote data recorder 24 tometering data center 26 (FIG. 1). That is, at predetermined times, or inresponse to specific events such as, for example, a malfunction or poweroutage, an auto-dial MODEM (not shown) in electronic remote datarecorder 24 is enabled by central processing unit 50 to dial thetelephone number of metering data center 26. When such a communicationis in progress, central processing unit 50 provides an enable signal online 60 to power fail detection and recovery unit 56 bypassing thewrite-protect switch. After an automatic exchange of passwords,electronic remote data recorder 24 is enabled to communicate a trouble,or other message, to metering data center 26 and, while still connected,metering data center 26 is enabled to supply reprogramming data throughpower fail detection and recovery unit 56 to central processing unit 50.

Referring now to FIG. 4, a power fail/recovery threshold 72 receives thesample of the line voltage from line 58. The term "sample of the linevoltage" is intended to mean a voltage whose amplitude is relatedarithmetically to the actual AC line voltage available to electricenergy consumer 10. Such a sample may be the line voltage itself or theoutput voltage of the secondary winding of a transformer whose primarywinding receives the line voltage. Although the particular voltages atwhich certain events take place are governed by the amplitude of theoriginal line voltage, for concreteness, it is herein assumed that thenominal value of the line voltage on line 58 is 115 volts RMS.

Power fail/recovery threshold 72 produces two output signals, an AC OKsignal on AC OK line 62a and a power fail signal on a power fail line62b. When the line voltage is in a normal range exceeding about 80 voltsRMS, the power fail signal on power fail line 62b enables centralprocessing unit 50 to continue collection of energy usage data. When theAC voltage drops below 80 volts RMS, the power fail signal applied tocentral processing unit 50 causes it to inhibit further collection ofenergy usage data. All data necessary for permitting electronic remotedata recorder 24 to resume operation without loss of previously recordeddata is contained in non-volatile storage 80. If the line voltagecontinues to drop below about 50 volts, the signal on AC OK line 62acauses central processing unit 50 to go into a sleep mode in which poweris shut off to all components.

After a power shutoff, when the line voltage increases beyond about 75volts, the AC OK signal on AC OK line 62a enables central processingunit 50 to command reconnection of power to all devices in electronicremote data recorder 24, but operation of electronic remote datarecorder 24 remains inhibited until the power-fail signal on power failline 62b returns to an enabling condition at about 92 volts RMS. Thehysteresis between the voltage levels for removal and restoration of thepower fail and AC OK signals prevents dithering.

The circuits in power fail/recovery threshold 72 are conventionalthreshold, gate and multivibrator devices with which everyone skilled inthe art is completely familiar. It is believed that a detaileddescription thereof would lead only to prolixity and is thus omitted.

When power fail signal resumes, the enable signal applied from powerfail line 62b to an input of an AND gate 76 permits the contents ofnon-volatile storage 80 to be fed through AND gate 76 for examination ina CPU RAM status verification circuit 82. If the present application ofpower to electronic remote data recorder 24 is the first time that powerhas been applied following installation, the pattern of data innon-volatile storage 80 is random, as opposed to the ordered pattern ofdata existing in storage 80 at all other times. If a disordered patternof data indicating an initial turn-on is found, CPU RAM statusverification circuit 82 applies an enable signal on a line 84 to oneinput of an AND gate 86. A second input of AND gate 86 receives programdata from programming data line 70 which may originate in metering datacenter 26 (FIG. 1) or may be input from a local programmer. The outputof AND gate 86 is applied through an OR gate 88 and line 60c to centralprocessing unit 50. Thus, upon initial startup of electronic remote datarecorder 24, programming of central processing unit 50 is enabled.

An inverted output of CPU RAM status verification circuit 82 is appliedon a line 90 to a first input of an AND gate 92. The output of AND gate76 is applied on a line 94 to a second input of AND gate 92. An input online 60a from central processing unit 50 indicates that an outgoing callis in progress. This indication of an outgoing call is connecteddirectly to one input of an AND gate 96 and, through an inverter 98, toa third input of AND gate 92. The output of AND gate 92 is connectedthrough OR gate 88 to line 60c. The program data on programming dataline 70 is also applied to a second input of AND gate 96. The output ofAND gate 96 is connected through OR gate 88 to line 60c.

A write-protect switch 100 is a two-position switch having one terminalconnected to an enabling voltage +V and its other terminal connecteddirectly to a line 84 and through an inverter 102 to an input of ANDgate 92.

Write-protect switch 100 is normally in the open condition, therebypermitting control of programming to take place under control of theoutputs of CPU RAM status verification circuit 82 and the state of thesignal on line 60a. When closed, write-protect switch 100 inhibits ANDgate 92 and enables AND gate 86, regardless of the conditions of theoutputs of CPU RAM status verification circuit 82. This permitsprogramming remotely over the telephone line or on-site by an authorizedperson using, for example, a conventional optical interface such as onesupplied by the General Electric Company under the trademark Optocom.The program data is applied on programming data line 70 through enabledAND gate 86 and OR gate 88 to line 60c from whence it is applied tocentral processing unit 50.

The outgoing-call signal on line 60a, which may originate in a MODEM(not shown) or in central processing unit 50, permits programming datafrom programming data line 70 to be applied to central processing unit50 even when write-protect switch 100 is in its inhibiting position andthe condition is other than an initial startup. This makes electronicremote data recorder 24 programmable during an outgoing call it has, butprevents programming during an incoming call. This offers a layer ofsecurity to program data, as detailed in the foregoing generaldescription.

In some installations, it is desirable to permit external programmingduring more than one post-installation programming session. Such asituation may include an installation procedure in which an installerperforms testing using test data connected to power fail detection andrecovery unit 56 from a local programming device. Following installationand checkout, it may be desired to apply programming data, eitherlocally, or from metering data center 26, representing the operationalprogramming to be used in the actual collection of metering data. Inorder to accomplish this, the first time write-protect switch 100 isplaced in the closed position, central processing unit 50 recognizesthis change in condition by setting a flag. Then, during, for example,the first incoming telephone call subsequent to setting thewrite-protect switch in the closed position, central processing unit 50simulates an outgoing call by placing an outgoing-call signal on line60a. After this second external programming opportunity, centralprocessing unit no longer simulates an incoming call, and thus, thewrite-protect function goes into operation.

If subsequent unscheduled reprogramming is required in the absence of anoutgoing call, write-protect switch may be placed in the open positionfor a first programming opportunity. This restores the additionalprogramming opportunity in the same manner as described followinginitial installation. It can be foreseen that some installations maybenefit from the availability of a predetermined number of externalprogramming sessions in excess of two. This is readily accomplished byprogramming central processing unit 50 to permit more than oneadditional programming session following the first one afterwrite-protect switch is closed.

Referring momentarily to FIG. 3, data storage channels 44, 46 and 48 areidentical, thus, the following description of data storage channel 44will serve as the description for all.

Referring now to FIG. 5, data storage channel 44 includes a first-infirst-out memory 104 receiving energy-consumption pulses on line 18 atone of its inputs and a signal on a line 106a indicating that datacommunication is in progress. An output of first-in first-out memory 104is applied on a line 107 to one input of an AND gate 108. An intervalclock 109 receives system clock signals on a line 110. At regularintervals, interval clock 109 applies an enable signal on a line 112 toa second input of AND gate 108, whereby the contents of first-infirst-out memory 104 are passed through AND gate 108 to update thecontents of an interval data memory 114. An interval data directory 116receives a time signal from interval clock 109 on a line 118. Inaddition, interval data directory 116 receives a signal on a line 106bwhenever a time reset or a program change occurs, and a power-failsignal on line 106c indicating that processing of data has been haltedbecause of low voltage. Outputs of interval data memory 114 and intervaldata directory 116 are applied to output data line 66. A data pointer isapplied on a line 120 from interval data memory 114 to interval datadirectory 116. The data-communication signal on line 106a is alsoapplied to interval data directory 116.

During normal operation, in the absence of data communication, reset orpower failure, first-in first-out memory 104 accumulates energyconsumption pulses for a continuing sequence of fixed predeterminedperiods. At the end of each fixed predetermined period, the contents offirst-in first-out memory 104 are read out through AND gate 108 andstored as a number in interval data memory 114. The number indicates thetotal energy consumed in the fixed predetermined period. For compactstorage, interval data memory 114 is not required to store contemporarytime signals.

Interval data directory 116 stores three numbers each time any of thefollowing events occurs: data readout, time change, program change orpower failure. One of the numbers is the time that the event occurs.Another number is a pointer indicating the current storage locationbeing used in interval data memory 114. The third number is a flagindicating the type of event.

In a completely uneventful time between data readouts, interval datadirectory 116 contains only a single trio of numbers indicating the lasttime that a readout occurred. Given these numbers, and a date stampindicating the time at which the readout occurred, all of theconsumption data in interval data memory 114 can be related to the timesthey occurred. Accordingly, the data in interval data memory 114 isavailable with inferred contemporaneous time data to analyze the loadprofile for time-of-use and demand billing.

In the case of a power failure, two trios of numbers are stored: thepower-failure time and the power-resumption time with their relatedpointers and flags. For example, if data storage channel 44 employs aninterval of 15 minutes and updates interval data memory 114 onone-minute boundaries, a triggering event occurring at two minutesfollowing the beginning of an interval essentially breaks the intervalinto a two-minute portion and a 13-minute portion. The data pointer,event time and event flag stored in interval data directory 116 permitsinterpretation of the data in interval data memory 114 withoutambiguity.

Referring now to FIG. 6, communications control unit 34 includes another-phone-detect circuit 122, a telephone line-sharing circuit 124 anda MODEM 126 (modulator-demodulator). MODEM 126 is assumed to be aconventional device, preferably including an ability to answer anincoming call in response to a ringing signal and to initiate a callunder control of signals from central processing unit 50. Since it isconventional, further description of MODEM 126 is omitted herefrom.

Referring now to FIG. 7, the problem to be solved by other-phone-detectcircuit 122 is illustrated. It is assumed that, in order to be a goodneighbor to another user of the telephone line, electronic remote datarecorder 24 should relinquish the line so that the other user may use itif the other user indicates a desire to use the telephone line while itis being used by electronic remote data recorder 24 for datatransmission. Other-phone-detect circuit 122 is connected across atelephone line 128 in parallel with telephone instrument 36. A telephonesystem includes a DC power source, here represented by a central stationbattery 130 having a fixed-voltage of from about 42 to about 56 volts.An equivalent resistor, representing a line resistance 132, is shown inseries with one side of telephone line 128 to other-phone-detect circuit122.

The resistance of line resistance 132 is variable in a giveninstallation about a nominal value which may be from about 400 to about1700 ohms. For present purposes, telephone instrument 36 is representedby a local load resistance 134. A hook switch 136 responds to removingtelephone instrument 36 from its cradle by connecting local loadresistance 134 across telephone line 128. An internal resistance ofMODEM 126 is represented by a MODEM load resistance 138, which is placedin series with a MODEM hook switch 140.

Several problems must be recognized and overcome before the desire ofthe other user to use the telephone line can be determined from localload resistance 134 being placed across telephone line 128 by closure ofhook switch 136. In particular, it is necessary to recognize thecondition produced when local load resistance 134 is placed acrosstelephone line 128 while ignoring external events. External events arecharacterized either by relatively slow variations caused by fluctuationin central station battery 130 or line resistance 132 or by sharp spikesdue, for example, to lightning strikes. An off-hook condition oftelephone instrument 36, in contrast, is evidenced by a sharp reductionin voltage across other-phone-detect circuit 122 which thereafter variesslowly about its lower value with possible positive or negativeshort-duration superimposed spikes.

The magnitude of the slowly varying external variations in sourcevoltage and line resistance are such that a mere measurement of thevoltage across telephone line 128 is insufficient to indicate whether ornot local load resistance 134 is across telephone line 128 in parallelwith MODEM load resistance 138. However, advantage is taken of thedifferent detectable characteristics due to external sources and thosedue to telephone instrument 36 going off hook.

Referring to the curve in FIG. 8, three conditions which may be sensedby other-phone-detect circuit 122 are shown. With both telephoneinstrument 36 and MODEM 126 on hook, a voltage region 142 is seen to beslowly varying and may contain short-duration positive and/or negativevoltage spikes (not shown). When MODEM 126 goes off hook, the voltage isreduced as shown at 144. This voltage also includes a slow variation, inaddition to which, it may include one or more positive or negativespikes 146. When telephone instrument 36 goes off hook in parallel withMODEM 126, a lower voltage region 148 begins with a sharp transition 150from the DC level of voltage region 144 to the DC level of voltageregion 148. When voltage region 148 is detected by other-phone-detectcircuit 122, MODEM 126 relinquishes the line, thereby enabling line useby another user.

In brief, other-phone-detect circuit 122 employs a comparison of ashort-term average with a long-term average to detect the transitionfrom voltage region 144 to voltage region 148. When the differencebetween the short- and long-term averages exceeds a predeterminedthreshold for a predetermined period of time, a step transition isdetected. If the comparison fails, either in magnitude or the duration,detection does not occur. That is, the short-term average may respond tospike 146, but the long-term average does not. The predetermined periodof time is selected so that a transient event such as spike 146 passes,and the short-term average returns to agreement with the long-termaverage, before the end of the time period. This protectsother-phone-detect circuit 122 from responding to transient events.Also, if sharp transition 150 is too shallow to indicate that telephoneinstrument 36 has gone off hook, an insufficient difference between theaverages prevents triggering other-phone-detect circuit 122. Both theshort-term and the long-term averages follow the normal slow variationin line voltage and thus avoid triggering on this type of change.

Referring to FIG. 9, other-phone-detect circuit 122 consists of asignal-conditioner circuit 152 receiving the telephone line voltage ontelephone line 128, and a step-change detector 154. The output ofsignal-conditioner circuit 152 is applied on a line 171 in parallel toinputs of a long-term integrator 158. The outputs of short-termintegrator 156 and long-term integrator 158 are applied to inputs of adifferential amplifier 160. The output of differential amplifier 160 isapplied to the input of a threshold circuit 162. When threshold circuit162 receives a predetermined difference signal lasting for at least apredetermined period of time, it produces an other-phone-detect signalto cause MODEM 126 (FIG. 7) to go off line.

The apparatus in FIG. 9 can be realized with any convenient technology.In particular, one skilled in the art would recognize that suchapparatus could be implemented in analog or digital form withoutdeparting from the spirit and scope of the invention. For concreteness,an embodiment of the invention is described in the following paragraphsusing digital techniques for implementing step-change detector 154.

Referring now to FIG. 10, signal-conditioner circuit 152 includes anabsolute value circuit 164 receiving the telephone line voltage ofeither positive or negative polarity and producing a unipolar outputvoltage having an amplitude corresponding to that of the telephone linevoltage. One convenient implementation of absolute value circuit 164includes a conventional full-wave bridge rectifier circuit. The unipolaroutput of absolute value circuit 164 is applied to an opto-isolator 166which prevents large voltage transients on telephone line 128 fromaffecting succeeding circuits. The output of opto-isolator 166 passesthrough a conventional level shifter 168 which adjusts the amplitudelimits of the output of level shifter 168 before application to avoltage-to-frequency converter 170.

Voltage-to-frequency converter 170 produces a square-wave output signalhaving a frequency related to the voltage applied to its input. Therelationship may be positive or negative. In a preferred embodiment, theoutput frequency of voltage-to-frequency converter 170 increases withincreasing voltage. Stated another way, the period of the output pulsesfrom voltage-to-frequency converter 170 decreases with increasingvoltage input. Voltage-to-frequency converter 170 may be a conventionaltimer such as, for example, a 555 timer, with suitable externalcomponents. In the preferred embodiment, voltage-to-frequency converter170 is a pulse-generating circuit capable of producing a square-waveoutput having about a 50 percent duty ratio over the entire frequencyrange.

Returning now to FIG. 9, the functions performed by step-change detector154 are done in a digital processor and, most preferably, in amicroprocessor. The periods of the pulses from signal-conditionercircuit 152 may be measured in the processor by conventional means andthe short-term and long-term averages logically illustrated asshort-term integrator 156 and long-term integrator 158 can be derivedfrom the measured periods using conventional arithmetic techniques. Arunning difference between the two averages, logically illustrated bydifferential amplifier 160, may also be taken by subtraction in theprocessor. Finally, the thresholding and delay functions logically,illustrated by threshold circuit 162, can also be performed in theprocessor.

The presence of absolute value circuit 164 makes signal-conditionercircuit 152 and step-change detector 154 indifferent to the polarity ofa step change or a transient. When a telephone call is being dialled byelectronic remote data recorder 24, other-phone-detect circuit 122continues to monitor the voltages on telephone line 128. If, during suchdialling, another telephone instrument 36 should go off hook, it islikely that a person listening on such an instrument would hear thedialling tones and would place that instrument on hook. As a goodneighbor, it is desirable that, sensing that another user is attemptingto place a telephone call, electronic remote data recorder 24 should goon hook. Due to the presence of absolute value circuit 164, a sharpvoltage transition produced by the other telephone going on hook,opposite in polarity to that shown in FIG. 8, is detected in the samemanner described for another telephone going off hook during the body ofa telephone session. Thus, other-phone-detect circuit 122 produces adetect signal on line 123 causing electronic remote data recorder 24 togo on hook, thereby permitting the other user to proceed with itsintended call.

Referring now to FIG. 11, telephone line-sharing circuit 124 is anoptional feature permitting a plurality of electronic remote datarecorders 24, 24' and 24" to be polled using a single shared telephoneline without interfering with each other. One of electronic remote datarecorders 24, 24' and 24" is considered a master and the remainder,slaves. For present purposes, electronic remote data recorder 24 isconsidered to be the master, and electronic remote data recorders 24'and 24" the slaves. Outgoing calls may be initiated by any telephoneline-sharing circuit 124. For incoming calls, each telephoneline-sharing circuit 124 responds to a unique code on telephone line 28by turning on its transmitting carrier, whereby communications areinitiated by placing the MODEM carrier on the line. It also responds toreception of a unique code of any of the other telephone line-sharingcircuits 124, not its own, by turning off its carrier.

A carrier is required from a MODEM before communications can beestablished. Upon the occurrence of an incoming call, master telephoneline-sharing circuit 124 triggers its MODEM 126 to produce an answercarrier and to maintain it at least until communications areestablished. If the incoming call addresses master electronic remotedata recorder 24, then communications can proceed without furtherprotocol, other than the normal security codes. Telephone line-sharingcircuits 124' and 124" monitor telephone line 28, listening for theirunique identification codes. If the incoming call is addressed to anelectronic remote data recorder other than master electronic remote datarecorder 24, once communications are established with MODEM 126, asnoted above, the incoming call contains the unique code of theelectronic remote data recorder being called. Master telephoneline-sharing circuit 124, hearing an identity code other than its own,triggers MODEM 126 to turn off its carrier. The slave telephoneline-sharing circuit, hearing its own identity code, triggers its MODEMto turn on its answer carrier. The transition between the master andslave carriers is fast enough to permit the calling MODEM (not shown) toignore any small gap in answer carrier which may occur during thechangeover.

The foregoing description has employed logical elements such as, forexample, gates, comparators and threshold circuits, to illustrate thefunctions performed by the apparatus of the invention. It would be clearto one skilled in the art that substantially all of the describedfunction may be performed by a suitable digital processor and such anembodiment is fully encompassed within the scope of the invention.

Having described preferred embodiments of the invention with referenceto the accompanying drawings, it is to be understood that the inventionis not limited to those precise embodiments, and that various changesand modifications may be effected therein by one skilled in the artwithout departing from the scope or spirit of the invention as definedin the appended claims.

What is claimed is:
 1. An electronic remote data recorder for recordingdata in a using facility, said using facility including at least onefunction controlled by at least one programmable switch responsive tosignals from said electronic remote data recorder, comprising:means forcontrolling said at least one programmable switch in response to aclock; a programmable switch library including a relationship of acondition of said at least one programmable switch and at least onetime; and means responsive to power restoration following a power outagefor controlling said at least one programmable switch in response to acontent of said programmable switch library.
 2. A data recording channelcomprising:(a) a data memory having addressable storage locations; (b)means for periodically storing pulse data in addressable storagelocations of said data memory to form a profile of data accumulated overtime; (c) a data directory having addressable storage locations; and (d)means for storing in addressable storage locations of said datadirectory, at the time of occurrence of an event, event-type dataspecifying a type of event occurring in said data recording channel andtime data specifying the time of occurrence of the specified type ofevent, the type of event and time data being related to the pulse datain said data memory and being useable in a prescribed manner to permitan after-the-fact reconstruction of a profile of that data accumulatedin the addressable storage locations of said data memory up to the timeof occurrence of the stored specified type of event.
 3. A data recordingchannel according to claim 2, further comprising:(a) afirst-in-first-out register for receiving said pulse data and passingsaid pulse data therethrough for storage in said data memory by saidmeans for periodically storing pules data; and (b) means, responsive tothe occurrence of a specified type of event representative of datacommunication in progress, for storing incoming pulse data in saidfirst-in-first-out register during said data communication to enable afrozen snapshot of the data accumulated in said data memory to betransmitted.
 4. A data recording channel comprising:(a) a data memoryhaving addressable storage locations; (b) means for periodically storingpule data in addressable storage locations of said data memory to form aprofile of data accumulated over time; (c) a data directory havingaddressable storage locations; and (d) means for storing in addressablestorage locations of said data directory, at the times of occurrence ofeach one of a plurality of different types of events, event-type dataspecifying a type of event occurring in said data recording channel,time data specifying the time of occurrence of each specified type ofevent and a data pointer associated with each specified type of event,the associated data pointer for each specified type of event identifyinga specified addressable storage location in said data memory containingpules data and being related to the pulse data in said data memory andbeing useable in a prescribed manner to permit an after-the-factreconstruction of a profile of that data accumulated in the addressablestorage locations of said data memory between the occurrence ofdifferent specified types of events.
 5. In an electricity meteringsystem, the combination comprising:(a) an electricity meter forgenerating pulse signals, each representative of a quantum of electricalenergy consumption; (b) a metering data center; and (c) an electronicdata recorder in communication with said electricity meter and saidmetering data center, said electronic data recorder including,(i) aninterval data memory, having a plurality of addressable storagelocations, for accumulating the pulse signals from said electricitymeter as interval data representative of a load profile of the amount ofelectrical energy consumed in each of a plurality of contiguousintervals, said interval data memory generating, at an output thereof,data pointer signals representative of a data pointer continuouslyidentifying the current interval data memory storage location in whichinterval data is being stored; (ii) means for generating a plurality ofevent-type data signals, each specifying a different type of eventoccurring in said electronic data recorder, and time data signalsspecifying the time of occurrence of each specified type of event; (iii)an interval data directory, in communication with said means forgenerating and with said interval data memory, responsive to an eventype data signal of a first type for storing information identifying afirst type of event, the time of occurrence of the first type of eventand a first data pointer identifying a first interval data memorystorage location for the storage of interval data, and responsive to anevent-type data signal of a second type for storing informationidentifying a second type of event, the time of occurrence of the secondtype of event, and a second data pointer identifying the last storagelocation in said interval data memory in which interval data was storedat the time of occurrence of the event type data signal of the secondtype, and (iv) means for transmitting, to said metering data center, theinterval data accumulated in said interval data memory, and the firstand second type event information, the time information of each of thefirst and second types of events and the first and second data pointersstored in said interval data directory for use in said metering datacenter in reconstructing a load profile of the interval data accumulatedin said interval data memory between the occurrence of the first andsecond types of events.
 6. In an electricity metering system of the typeincluding a metering data center, an electricity meter for generatingpulse signals, each representative of a quantum of electrical energyconsumption, and an electronic data recorder, in communication with saidmetering data center and said electricity meter, for communicating withsaid metering data center and for accumulating the pulse signals asinterval data representative of the amount of electrical energy consumedin each of a plurality of contiguous intervals, each interval having apredetermined time period during which the pulse signals areaccumulated, said electronic data recorder comprising:(a) an intervaldata memory, having a plurality of addressable storage locations, foraccumulating interval data to form a load profile of the amount ofelectrical energy consumed in each of a plurality of contiguousintervals, said interval data memory generating, at all output thereof,data pointer signals representative of a data pointer continuouslyidentifying the current storage location in which interval data is beingstored; (b) means, in communication with said electricity meter, forperiodically storing the pulse signals as interval data in addressablestorage locations of said interval data memory; (c) means for generatingevent type data signals specifying a type of event occurring in saidelectronic data recorder, and time data signals specifying the time ofoccurrence of the event; and (d) an interval data directory, havingaddressable storage locations and being responsive to an event type datasignal for storing the event type and time data signals from said meansfor generating, and the data pointer signals from said interval datamemory s information related to the accumulated interval data in saidinterval data memory and usuable, by said metering data center, toreconstruct the load profile of the electrical energy consumed in allcontiguous intervals up to the time of occurrence of an event by,identifying the type of event, the time of occurrence of the event, andan address pointing to the last storage location in said interval datamemory in which interval data was stored at the time of occurrence ofthe event.
 7. A data recording channel comprising:(a) a data memoryhaving addressable storage locations; (b) means for periodically storingpulse data in addressable storage locations of said data memory to forma profile of data accumulated over time; (c) a data directory havingaddressable storage locations; (d) means for storing in addressablestorage locations of said data directory, at the time of occurrence ofan event, event-type data specifying a type of event occurring in saiddata recording channel and time data specifying the time of occurrenceof the specified type of event, the type of event and time data beingrelated to the pulse data in said data memory and being useable in aprescribed manner to permit an after-the-fact reconstruction of aprofile of that data accumulated in the addressable storage locations ofsaid data directory up to the time of occurrence of the stored specifiedtype of event; (e) a first-in-first-out register for receiving saidpulse data and passing said pulse data therethrough to said means forperiodically storing before being stored in said data memory; and (f)means responsive to a type of event representative of a datacommunication in progress for storing incoming pulse data in saidfirst-in-first-out register, whereby a frozen snapshot of data in saiddata memory is transmitted during the time that said data communicationis in progress.